'\" t
.\"     Title: gpsdctl
.\"    Author: Eric S. Raymond
.\" Generator: Asciidoctor 2.0.18
.\"      Date: 2023-01-10
.\"    Manual: GPSD Documentation
.\"    Source: GPSD, Version 3.25
.\"  Language: English
.\"
.TH "GPSDCTL" "8" "2023-01-10" "GPSD, Version 3.25" "GPSD Documentation"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
gpsdctl \- tool for sending commands to gpsd over its control socket
.SH "SYNOPSIS"
.sp
\fBgpsdctl\fP \fIaction\fP \fIdevice\fP
.SH "OPTIONS"
.sp
\fBaction\fP
.RS 4
may be \fIadd\fP or \fIremove\fP. If no daemon instance
is running when an \fIadd\fP is requested, this program will launch one.
.RE
.sp
\fBdevice\fP
.RS 4
argument should be the pathname of a device. The device
will be opened by \fBgpsd\fP to read sensor data.
.RE
.SH "DESCRIPTION"
.sp
This is a tool for sending an instance of \fBgpsd\fP commands over its control
socket to add or remove devices from the daemon\(cqs device list. It is not
intended to be called by users, but rather by the Linux hotplug system
and similar facilities.
.SH "ENVIRONMENT"
.sp
Two environment variables are interpreted.
.sp
\fBGPSD_SOCKET\fP
.RS 4
sets the location of the control socket. If the effective
user ID of this program is root then it usually defaults to
\fI/run/gpsd.sock\fP, although some systems may use the deprecated
\fI/var/run/gpsd.sock\fP instead. Non\-root users will use \fI/tmp/gpsd.sock\fP.
.RE
.sp
\fBGPSD_OPTIONS\fP
.RS 4
may be a list of options to be passed to gpsd when this
tool launches it. It defaults to an empty string.
.RE
.SH "RETURN VALUES"
.sp
\fB0\fP
.RS 4
on success.
.RE
.sp
\fB1\fP
.RS 4
if the action was unknown or the write to the control socket failed,
.RE
.SH "SEE ALSO"
.sp
\fBgpsd\fP(8), \fBgpsctl\fP(1), \fBgps\fP(1), \fBlibgps\fP(3), \fBlibgpsmm\fP(3), \fBgpsprof\fP(1),
\fBgpsfake\fP(1).
.SH "RESOURCES"
.sp
\fBProject web site:\fP \c
.URL "https://gpsd.io/" "" ""
.SH "COPYING"
.sp
This file is Copyright 2013 by the GPSD project
.br
SPDX\-License\-Identifier: BSD\-2\-clause
.SH "AUTHOR"
.sp
Eric S. Raymond